package s47.dqj.dao;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;

import s47.dqj.bean.DepartmentType;

public interface DepartmentTypeDaoInf {

	@Resource(name = "sessionFactory")
	public abstract void setSupperSessionFactory(SessionFactory sessionFactory);

	/**
	 * 查找所有的部门
	 * @return
	 */
	public abstract List<DepartmentType> findAll();

	/**
	 * 根据id查找部门
	 * @param departmentType
	 * @return
	 */
	public abstract DepartmentType findObjectById(DepartmentType departmentType);

	/**
	 * 根据dtid查找部门
	 * @param departmentType
	 * @return
	 */
	public abstract DepartmentType findObjectByDtid(
			DepartmentType departmentType);

	/**
	 * 根据departmentType
	 * @param dtnameSimple查找部门
	 * @return
	 */
	public abstract List<DepartmentType> findObjectByDtnameSimple(
			DepartmentType departmentType);

	/**
	 * 添加一个部门
	 * @param departmentType
	 */
	public abstract void save(DepartmentType departmentType);

	/**
	 * 修改一个部门信息
	 * @param departmentType
	 */
	public abstract void update(DepartmentType departmentType);

	/**
	 * 删除一个部门信息
	 * @param departmentType
	 */
	public abstract void delect(DepartmentType departmentType);

}